package cn.liyao.web.repository;

import cn.liyao.web.model.Group;
import cn.liyao.web.model.GroupMember;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface GroupMemberRepository extends JpaRepository<GroupMember, String> {

    List<GroupMember> findAllByGroupIdAndUserState(String groupId,Integer state);


    GroupMember findByGroupIdAndUserId(String groupId,String userId);

    void deleteByGroupIdAndUserId(String groupId, String userId);
}